package com.wuyangnju.healthclub.service;

import javax.annotation.Resource;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.wuyangnju.healthclub.dao.PersonDao;
import com.wuyangnju.healthclub.entity.Person;

@Component
public class PersonService {

	@PersistenceContext
	protected EntityManager em;

	@Resource
	private PersonDao personDao;

	@Transactional
	public void post(Person person) {
		personDao.create(em, person);
	}

}